package varton.lazy.safe;

public class Wife2 {
    private static Wife2 wife = null;

    private Wife2(){

    }

    public static Wife2 newInstance(){
        if (wife == null){
            synchronized (Wife2.class){
                if (wife == null){
                    wife = new Wife2();
                }
            }
        }
        return wife;
    }

    public void haveBaby(){
        System.out.println("能生娃。。。");
    }
}
